<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        /* 规定字符串中字符出现规律的表达式 */
        var str = "hellLo"
        var reg = /l/ig 
        // i 忽略大小写   g 全局替换
        console.log(str.replace(reg,"*"));
    </script>
</body>
</html>